<!--当日订单情况的汇总信息-->
<div id="order_today">
<div class="span-10 left">
<p class="desc">本日订单总数<span class="big_number"><?php echo $today_order['count_today_order']; ?></span></p>
<?php 
if( $today_order['count_today_order'] != 0 ){
?>
<p class="desc">
当日各服务订单数据
<div class="figure" id="stat_product_class_figure"></div>
</p>

<p class="desc">
<a href="/admin/order/show/today/">查看本日的订单</a>
</p>
<?php
}
?>
<!--p class="desc">
当日各商品订单数据
</p-->
</div>

<?php if( !empty( $today_order['stat_product_class'] ) ){?>
<div class="span-12 left">
<table>
	<tr>
		<th>服务名称</th>
		<th>当日销量</th>
	</tr>
<?php
foreach( $today_order['stat_product_class'] as $index=>$product_class_info ){
?>
<tr>
<td class="align_center"><?php echo $product_class_info['class_name'] ?></td>
<td class="align_center"><?php echo $product_class_info['sum'] ?></td>
</tr>
<?php
}
?>
</table>
</div>
<?php } ?>
</div>

<script type="text/javascript">
var data = [
<?php 
$count_stat_product_class = count( $today_order['stat_product_class'] );  
foreach( $today_order['stat_product_class'] as $no=>$value ){
?>
{ label: "<?php echo $value['class_name']; ?>",  data: <?php echo $value['ratio']; ?> }
<?php
	if( $no+1 < $count_stat_product_class ){
?>
,
<?php
	}
}
?>
	]
$.plot($("#stat_product_class_figure"), data, 
{
        series: {
            pie: { 
                show: true
            }
        },
        legend: {
            show: false
        }
});

</script>
